<template>
  <div class="minus">
      <Button @click="lose(index)">-</Button>
  </div>
</template>

<script>
export default {
    name:'Minus',
    props:['arr','index'],
    methods:{
        lose(index){
            // 通过this.$emit传值给父组件
            this.$emit('onlose',index)
        }
    }
}
</script>

<style scoped>
.minus{
    display: inline-block;
}
button{
    width: 30px;
}
</style>